package com.zixuan.sina.config.rabbitmq;

import com.rabbitmq.client.Channel;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.amqp.support.AmqpHeaders;
import org.springframework.messaging.handler.annotation.Header;
import org.springframework.stereotype.Component;

//@Component
@Slf4j
public class ConsumerTest {
//    @SneakyThrows
//    @RabbitListener(queues = "my_queue",ackMode = "MANUAL")
    public void lisen(String message, Channel channel, @Header(AmqpHeaders.DELIVERY_TAG) long deliveryTag){
      log.info("message:===>{}",message);

    }
}
